package com.example.a7822.myapplication;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import org.linphone.CallActivity;

import butterknife.ButterKnife;

import static com.example.a7822.myapplication.Constant.TAG;

/**
 * Created by flyln on 2017/10/26 21:30.
 * email:xyf_uestc@163.com
 */

public class YTCartActivity extends CallActivity {

//    @BindView(R.id.rv_cart) RecyclerView rvCart;
//    @BindView(R.id.tv_hello) TextView tv_hello;
    private LinearLayoutManager mLayoutManager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        View superView = super.findViewById(android.R.id.content);
        ViewGroup root = (ViewGroup) superView.getParent();

        LayoutInflater inflater = LayoutInflater.from(this);
//        View v = inflater.inflate(R.layout.activity_cart, null, false);

        View child = getLayoutInflater().inflate(R.layout.activity_cart, null);
//        View viewToLoad = LayoutInflater.from(this.getParent()).inflate(R.layout.activity_cart, null,false);
        ViewGroup.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        addContentView(child,params);
        Log.d(TAG,"YTCartActivity:onCreate");
        ButterKnife.bind(this);

//        tv_hello.setText("你好毒");


//        rvCart.setHasFixedSize(true);
//
//        mLayoutManager = new LinearLayoutManager(this);
//        rvCart.setLayoutManager(mLayoutManager);
//
//        rvCart.setItemAnimator(new DefaultItemAnimator());
//        mAdapter = new NewsAdapter(getActivity().getApplicationContext());
//        mAdapter.setOnItemClickListener(mOnItemClickListener);
//        rvCart.setAdapter(mAdapter);
//        rvCart.addOnScrollListener(mOnScrollListener);



    }

}
